namespace EyeSoft.AsyncAwait.Shell
{
	using System;
	using System.Threading.Tasks;

	public class NumberGenerator
	{
		public static async Task<int> Show()
		{
			var generator = new NumberGenerator();
			var number = await generator.Generate();
			Console.WriteLine(number);

			return number;
		}

		public Task<int> Generate()
		{
			return Task.Run(() => new Random().Next(1, 1000));
		}
	}
}